/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "banner")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Banner.findAll", query = "SELECT b FROM Banner b"),
    @NamedQuery(name = "Banner.findByIdbanner", query = "SELECT b FROM Banner b WHERE b.idbanner = :idbanner"),
    @NamedQuery(name = "Banner.findByBannerLinkTitle", query = "SELECT b FROM Banner b WHERE b.bannerLinkTitle = :bannerLinkTitle"),
    @NamedQuery(name = "Banner.findByBannerLinkAddres", query = "SELECT b FROM Banner b WHERE b.bannerLinkAddres = :bannerLinkAddres"),
    @NamedQuery(name = "Banner.findByBannerLinkIsProductId", query = "SELECT b FROM Banner b WHERE b.bannerLinkIsProductId = :bannerLinkIsProductId"),
    @NamedQuery(name = "Banner.findByBannerFileName", query = "SELECT b FROM Banner b WHERE b.bannerFileName = :bannerFileName"),
    @NamedQuery(name = "Banner.findByShareAtctivityFlag", query = "SELECT b FROM Banner b WHERE b.shareAtctivityFlag = :shareAtctivityFlag"),
    @NamedQuery(name = "Banner.findByBannerAddres", query = "SELECT b FROM Banner b WHERE b.bannerAddres = :bannerAddres")})
public class Banner implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idbanner")
    private Integer idbanner;
    @Size(max = 45)
    @Column(name = "banner_link_title")
    private String bannerLinkTitle;
    @Size(max = 45)
    @Column(name = "banner_link_addres")
    private String bannerLinkAddres;
    @Size(max = 45)
    @Column(name = "banner_link_is_product_id")
    private String bannerLinkIsProductId;
    @Size(max = 45)
    @Column(name = "bannerFileName")
    private String bannerFileName;
    @Size(max = 45)
    @Column(name = "share_atctivity_flag")
    private String shareAtctivityFlag;
    @Size(max = 200)
    @Column(name = "banner_addres")
    private String bannerAddres;

    public Banner() {
    }

    public Banner(Integer idbanner) {
        this.idbanner = idbanner;
    }

    public Integer getIdbanner() {
        return idbanner;
    }

    public void setIdbanner(Integer idbanner) {
        this.idbanner = idbanner;
    }

    public String getBannerLinkTitle() {
        return bannerLinkTitle;
    }

    public void setBannerLinkTitle(String bannerLinkTitle) {
        this.bannerLinkTitle = bannerLinkTitle;
    }

    public String getBannerLinkAddres() {
        return bannerLinkAddres;
    }

    public void setBannerLinkAddres(String bannerLinkAddres) {
        this.bannerLinkAddres = bannerLinkAddres;
    }

    public String getBannerLinkIsProductId() {
        return bannerLinkIsProductId;
    }

    public void setBannerLinkIsProductId(String bannerLinkIsProductId) {
        this.bannerLinkIsProductId = bannerLinkIsProductId;
    }

    public String getBannerFileName() {
        return bannerFileName;
    }

    public void setBannerFileName(String bannerFileName) {
        this.bannerFileName = bannerFileName;
    }

    public String getShareAtctivityFlag() {
        return shareAtctivityFlag;
    }

    public void setShareAtctivityFlag(String shareAtctivityFlag) {
        this.shareAtctivityFlag = shareAtctivityFlag;
    }

    public String getBannerAddres() {
        return bannerAddres;
    }

    public void setBannerAddres(String bannerAddres) {
        this.bannerAddres = bannerAddres;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idbanner != null ? idbanner.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Banner)) {
            return false;
        }
        Banner other = (Banner) object;
        if ((this.idbanner == null && other.idbanner != null) || (this.idbanner != null && !this.idbanner.equals(other.idbanner))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bean.Banner[ idbanner=" + idbanner + " ]";
    }
    
}
